﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace CCF20
{
    
    public class FaultType
    {
        public int ID { get; set; }
        public string Name { get; set; }
    }
    public class ListHelp
    {
        private List<FaultType> GetFaultType()
        {
            List<FaultType> faulttype = new List<FaultType>();

            faulttype.Add(new FaultType() { ID = 1, Name = "故障" });
            faulttype.Add(new FaultType() { ID = 2, Name = "里程" });
            faulttype.Add(new FaultType() { ID = 3, Name = "撞车" });

            return faulttype;
        }
        public List<GridColumn> GetColumnForVehicleType()
        {
            List<GridColumn> columnList = new List<GridColumn>();
            columnList.Add(new GridColumn() { ID = 1, Binding = "AnchiID", Header = "安驰ID",IsReadOnly=true });
            columnList.Add(new GridColumn() { ID = 1, Binding = "Manufacture", Header = "厂商", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 2, Binding = "Model", Header = "车型", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 3, Binding = "EngineType", Header = "发动机型号", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 3, Binding = "Displacement", Header = "排气量", IsReadOnly = true });
            return columnList;

        }
        public List<GridColumn> GetColumnForMaintenanceType()
        {
            List<GridColumn> columnList = new List<GridColumn>();
            columnList.Add(new GridColumn() { ID = 1, Binding = "AnchiID", Header = "安驰ID", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 1, Binding = "VehicleType.Manufacture", Header = "厂商", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 2, Binding = "VehicleType.Model", Header = "车型", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 3, Binding = "VehicleType.EngineType", Header = "引擎", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 4, Binding = "Name", Header = "项目描述" });
            columnList.Add(new GridColumn() { ID = 5, Binding = "ServiceMileage", Header = "服务里程" });
            columnList.Add(new GridColumn() { ID = 6, Binding = "ServicePeriod", Header = "服务时间" });
            columnList.Add(new GridColumn() { ID = 6, Binding = "Priority", Header = "次数", IsReadOnly = true });
            return columnList;   

        }
        public List<GridColumn> GetColumnForSMSTemplate()
        {
            List<GridColumn> columnList = new List<GridColumn>();
            columnList.Add(new GridColumn() { ID = 1, Binding = "SMSTitle", Header = "短信模板" });
            columnList.Add(new GridColumn() { ID = 2, Binding = "SMSText", Header = "短信内容" });
            columnList.Add(new GridColumn() { ID = 3, Binding = "Operator", Header = "修改人员",IsReadOnly=true });
            columnList.Add(new GridColumn() { ID = 4, Binding = "ModifiedTime", Header = "修改时间", IsReadOnly=true});
            return columnList;

        }
        public List<GridColumn> GetColumnForSMSHistory()
        {
            List<GridColumn> columnList = new List<GridColumn>();
            columnList.Add(new GridColumn() { ID = 1, Binding = "CustomerName", Header = "客户姓名", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 2, Binding = "CustomerMobile", Header = "手机号", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 3, Binding = "SendTimes", Header = "发送时间", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 4, Binding = "SMSText", Header = "发送内容", IsReadOnly = true });
            return columnList;

        }
        
        public List<GridColumn> GetColumnForCustomizedTroubleCode()
        {
            List<GridColumn> columnList = new List<GridColumn>();
            columnList.Add(new GridColumn() { ID = 1, Binding = "Code", Header = "故障号", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 2, Binding = "CodeDescription", Header = "故障描述" });
            columnList.Add(new GridColumn() { ID = 3, Binding = "CodeVersion", Header = "故障号版本", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 4, Binding = "CodeType", Header = "故障等级", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 4, Binding = "IsCustomized", Header = "4S店定制", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 4, Binding = "VehicleType.Model", Header = "车型", IsReadOnly = true });
            columnList.Add(new GridColumn() { ID = 4, Binding = "VehicleType.EngineType", Header = "引擎", IsReadOnly = true });
            return columnList;

        }
        public List<GridColumn> GetColumnForRemindList()
        {
            List<GridColumn> columnList = new List<GridColumn>();
            columnList.Add(new GridColumn() { ID = 1, Binding = "FirstMobile", Header = "手机号码" });
            columnList.Add(new GridColumn() { ID = 2, Binding = "TimeGap", Header = "提醒时间间隔" });
            columnList.Add(new GridColumn() { ID = 3, Binding = "Name", Header = "联系人" });
            columnList.Add(new GridColumn() { ID = 4, Binding = "Job", Header = "职位名称" });
            return columnList;

        }
        public List<GridColumn> GetColumnForContactResult()
        {
            List<GridColumn> columnList = new List<GridColumn>();
            columnList.Add(new GridColumn() { ID = 1, Binding = "Result", Header = "联系结果" });
            return columnList;

        }
    }
    public class GridColumn
    {
        private bool _isReadOnly = false;
        public int ID { get; set; }
        public string Binding { get; set; }
        public string Header { get; set; }
        public bool IsReadOnly 
        {
            get
            {
              return _isReadOnly;
            }
            set
            {
                _isReadOnly = value;
            }

        }
    }
    
}
